package qc.module.platform.mapper;

import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import qc.module.platform.dto.config.group.ConfigGroupDto;
import qc.module.platform.entity.QcProjectConfigGroups;

import java.util.List;

/**
 * ProjectConfigGroupsMapper
 *
 * @author QuCheng Tech
 * @create 2023/02/07
 */
@Mapper
public interface ProjectConfigGroupsMapper {
    ProjectConfigGroupsMapper MAPPER = Mappers.getMapper(ProjectConfigGroupsMapper.class);

    @Mapping(target = "pcode" , source = "projectcode")
    ConfigGroupDto toDto(QcProjectConfigGroups en);

    List<ConfigGroupDto> toDtoList(List<QcProjectConfigGroups> list);
}
